package com.chatplus.application.domain.response;

import com.chatplus.application.domain.dto.UserCustomChatConfigDto;
import com.chatplus.application.json.Int64AsString;
import com.chatplus.application.json.PhoneJsonSerializer;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;

import java.io.Serializable;

/**
 * 账户信息响应
 */
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class AccountProfileResponse implements Serializable {


    /**
     * id : 101
     * mobile : 15302789406
     * avatar : /images/avatar/user.png
     * chat_config : {"api_keys":{"Azure":"","ChatGLM":"","OpenAI":""}}
     * calls : 9973
     * img_calls : 12
     * total_tokens : 33221
     * tokens : 0
     * expired_time : 1706025158
     * vip : false
     */

    @JsonProperty("id")
    @JsonSerialize(using = Int64AsString.class)
    private Long id;
    @JsonProperty("nickname")
    private String nickname;
    @JsonProperty("username")
    @JsonSerialize(using = PhoneJsonSerializer.class)
    private String username;
    @JsonProperty("avatar")
    private String avatar;
    @JsonProperty("chat_config")
    private UserCustomChatConfigDto chatConfig;
    @JsonProperty("calls")
    private int calls;
    @JsonProperty("img_calls")
    private int imgCalls;
    @JsonProperty("total_tokens")
    private int totalTokens;
    @JsonProperty("tokens")
    private int tokens;
    @JsonProperty("expired_time")
    private int expiredTime;
    @JsonProperty("vip")
    private boolean vip;

}
